<!DOCTYPE html>
<html lang="en">

<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
	<meta http-equiv="X-UA-Compatible" content="ie=edge,chrome=1">
	<link rel="stylesheet" href="css/bootstrap.min.css">
	<link rel="stylesheet" type="text/css" href="css/element.css" />
	<link rel="stylesheet" href="css/lmitQuery.css">
	<title>涨停复盘</title>
	<script src="js/jquery-3.3.1.min.js"></script>
	<script src="js/bootstrap.min.js"></script>

</head>

<body>
	<div class="body" id="app">
		<div class="navTop">
			<ul class="nav nav-tabs" id="myTab">
				<li class="active backgroundRed"><a href="#converOne">每日涨停查询</a></li>
				<li><a href="#converTwo">涨停统计查询</a></li>
			</ul>
			<span style="display: inline-block;position: absolute; top: 1rem; right: 1rem;font-size: 1.6rem;"><a
					href="index.jsp">返回涨停助手首页</a></span>
		</div>
		<div class="tab-content">
			<div id="converOne" class="tab-pane">
				<div class="navClass">
					<ul>&nbsp;
						<li title="起始日期">起始日期:&nbsp;&nbsp;&nbsp;
							<el-date-picker name="mrzt-start" size='small' style="width: 11rem;" v-model="start" type="date"
								:picker-options="{
									disabledDate(time) {
										return time.getTime() > Date.now() || time.getDay() == 0 || time.getDay() == 6;
							        },
							    }" placeholder="选择日期" value-format="yyyy-MM-dd">
							</el-date-picker>
						</li>
						<li title="结束日期">结束日期:&nbsp;&nbsp;&nbsp;
							<el-date-picker name="mrzt-end" size='small' style="width: 11rem;" v-model="end" type="date"
								:picker-options="{
									disabledDate(time) {
										return time.getTime() > Date.now() || time.getDay() == 0 || time.getDay() == 6;
									},
							    }" placeholder="选择日期" value-format="yyyy-MM-dd">
							</el-date-picker>
						</li>
						<li>连板:&nbsp;&nbsp;&nbsp;
							<el-select name="lb_count" size='small' style="width: 7.5rem;" v-model="lb_count_value" placeholder="请选择">
								<el-option v-for="item in lb_count_options" :key="item.value" :label="item.label" :value="item.value">
								</el-option>
							</el-select>
						</li>
						<!-- <li>首次:&nbsp;&nbsp;&nbsp;
							<el-time-picker value-format="HH:mm" name="zt_time" size='small' style="width: 10rem;" v-model="zt_time"
								:picker-options="{
							      selectableRange: ['09:15:00 - 11:30:00', '13:00:00 - 15:00:00'],format:'HH:mm'
							    }" placeholder="选择时间">
							</el-time-picker>
						</li>
						<li>最后:&nbsp;&nbsp;&nbsp;
							<el-time-picker value-format="HH:mm" name="last_zttime" size='small' style="width: 10rem;"
								v-model="last_zttime" :picker-options="{
							      selectableRange: ['09:15:00 - 11:30:00', '13:00:00 - 15:00:00'],format:'HH:mm'
							    }" placeholder="选择时间">
							</el-time-picker>
						</li> -->
						<li title="单位(万元)">成交金额:&nbsp;&nbsp;&nbsp;
							<el-input class="number-input" style="width: 9rem;" size='small' name="amount" type="number"
								v-model="amount" placeholder="单位(万元)">
						</li>
						<!-- <li>换手(%):&nbsp;&nbsp;&nbsp;
							<el-input class="number-input" style="width: 7rem;" size='small' name="tor" type="number" v-model="tor">
						</li> -->
						<!-- <li>开板次数:&nbsp;&nbsp;&nbsp;
							<el-input class="number-input" style="width: 6rem;" size='small' name="stock_open" type="number"
								v-model="stock_open">
						</li> -->
						<!-- <li title="单位(亿)">流通市值:&nbsp;&nbsp;&nbsp;
							<el-input class="number-input" style="width: 7rem;" size='small' name="ltsz" type="number" v-model="ltsz"
								placeholder="单位(亿)">
						</li> -->
						<li style="margin-left: 3rem;"><button id="mrzt-query" style="width: 6rem; margin-top: -.5rem;"
								@click="jumpAjaxData" class="btn btn-primary">查询数据</button></li>
						<li style="margin-left: 3rem;"><button id="mrzt-reset" style="width: 6rem; margin-top: -.5rem;"
								class="btn btn-primary">重置</button></li>
					</ul>
				</div>
				<!-- 温馨提示 -->
				<div style="color: white;margin-left: 1.5rem;font-size: 1.6rem;position: absolute;top: 9.5rem;">
					温馨提示:&nbsp;本次查询<span style="color: red;font-size: 1.8rem;">&nbsp;{{AllBingo}}&nbsp;</span>条数据,
					一次最多查询<span style="color: red;font-size: 1.8rem;">&nbsp;500&nbsp;</span>条历史数据。</div>
				<!-- 更多数据筛选 -->
				<div style="width: 85%;float: left;text-align: center;">
					<el-popover ref="popover" placement="bottom" width="700" trigger="click" style="height: 1000px;"
						v-model="visible2">
						<!-- <el-input type="text"></el-input> -->
						<div class="twoSXone">
							<ul style="list-style: none; ">
								<li title="首次时间区间">首次:&nbsp;&nbsp;&nbsp;
									<el-time-picker value-format="HH:mm:ss" name="firstZt_time" size='small' style="width: 10rem;"
										v-model="firstZt_time" :picker-options="{
														selectableRange: ['09:15:00 - 11:30:00', '13:00:00 - 15:00:00'],format:'HH:mm：ss'
													}" placeholder="选择时间">
									</el-time-picker>
									&nbsp;&nbsp;----&nbsp;&nbsp;
									<el-time-picker value-format="HH:mm:ss" name="firstZt_time1" size='small' style="width: 10rem;"
										v-model="firstZt_time1" :picker-options="{
														selectableRange: ['09:15:00 - 11:30:00', '13:00:00 - 15:00:00'],format:'HH:mm:ss'
													}" placeholder="选择时间">
									</el-time-picker>
								</li>
								<!-- <li>
									<el-button type="primary" @click="onSearchLt(this,13)">立即筛选</el-button>
								</li> -->
							</ul>
						</div>
						<div class="twoSXone">
							<ul style="list-style: none; ">
								<li title="最后时间区间">最后:&nbsp;&nbsp;&nbsp;
									<el-time-picker value-format="HH:mm:ss" name="lastZt_time" size='small' style="width: 10rem;"
										v-model="lastZt_time" :picker-options="{
																selectableRange: ['09:15:00 - 11:30:00', '13:00:00 - 15:00:00'],format:'HH:mm:ss'
															}" placeholder="选择时间">
									</el-time-picker>
									&nbsp;&nbsp;----&nbsp;&nbsp;
									<el-time-picker value-format="HH:mm:ss" name="lastZt_time1" size='small' style="width: 10rem;"
										v-model="lastZt_time1" :picker-options="{
																selectableRange: ['09:15:00 - 11:30:00', '13:00:00 - 15:00:00'],format:'HH:mm:ss'
															}" placeholder="选择时间">
									</el-time-picker>
								</li>
						</div>
						<div class="twoSXone">
							<ul style="list-style: none;">
								<li title="连板数">连扳数:&nbsp;&nbsp;&nbsp;
								</li>
								<li>
									<div style="float: left;">
										<el-button type="primary" style="padding: 0.5rem;" @click="firstLbsJian">-</el-button>
										<el-input v-model="lbsValue[0]" style="width: 4rem;" class="sliderInput" @input="changeNumLbs"
											maxlength="10">
										</el-input>
										<el-button type="primary" style="padding: 0.5rem;" @click="firstLbsJia">+</el-button>
									</div>
									<div style="width: 19rem;float: left;margin-left: 1rem;margin-top: -0.5rem;">
										<el-slider v-model="lbsValue" range :max="10">
										</el-slider>
									</div>
									<div style="float: left;margin-left: 1rem;">
										<el-button type="primary" style="padding: 0.5rem;" @click="lastLbsJian">-</el-button>
										<el-input v-model="lbsValue[1]" placeholder="0" style="width: 4rem;" class="sliderInput"
											@input="changeNumLbs1">
										</el-input>
										<el-button type="primary" style="padding: 0.5rem;" @click="lastLbsJia">+</el-button>
									</div>
								</li>
							</ul>
						</div>
						<div class="twoSXone">
							<ul style="list-style: none;">
								<li title="单位(亿)">流通市值(亿):&nbsp;&nbsp;&nbsp;
								</li>
								<li>
									<div style="float: left;">
										<el-button type="primary" style="padding: 0.5rem;" @click="firstLtszJian">-</el-button>
										<el-input v-model="ltszValue[0]" placeholder="0" style="width: 5.5rem;" class="sliderInput"
											@input="changeNumLtsz">
										</el-input>
										<el-button type="primary" style="padding: 0.5rem;" @click="firstLtszJia">+</el-button>
									</div>
									<div style="width: 19rem;float: left;margin-left: 1rem;margin-top: -0.5rem;">
										<el-slider v-model="ltszValue" range :max="1500" :step="5">
										</el-slider>
									</div>
									<div style="float: left;margin-left: 1rem;">
										<el-button type="primary" style="padding: 0.5rem;" @click="lastLtszJian">-</el-button>
										<el-input v-model="ltszValue[1]" placeholder="0" style="width: 5.5rem;" class="sliderInput"
											@input="changeNumLtsz1">
										</el-input>
										<el-button type="primary" style="padding: 0.5rem;" @click="lastLtszJia">+</el-button>
									</div>
								</li>
								<!-- <li style="margin-top: -1rem; height: 1rem; margin-left: 2rem;">
									<el-button type="primary" @click="onSearchLt(this,13)">筛选流通市值(单位：亿)</el-button>
								</li> -->
							</ul>
						</div>
						<div class="twoSXone">
							<ul style="list-style: none;">
								<li title="单位(万元)">成交金额(万):&nbsp;&nbsp;&nbsp;
								</li>
								<li>
									<div style="float: left;">
										<el-button type="primary" style="padding: 0.5rem;" @click="firstCjjeJian">-</el-button>
										<el-input v-model="cjjeValue[0]" placeholder="0" style="width: 7rem;" class="sliderInput"
											@input="changeNumCjje">
										</el-input>
										<el-button type="primary" style="padding: 0.5rem;" @click="firstCjjeJia">+</el-button>
									</div>
									<div style="width: 21rem;float: left;margin-left: 1rem;margin-top: -0.5rem;">
										<el-slider v-model="cjjeValue" range :max="1000000" :step="1000" id="range">
										</el-slider>
									</div>
									<div style="float: left;margin-left: 1rem;">
										<el-button type="primary" style="padding: 0.5rem;" @click="lastCjjeJian">-</el-button>
										<el-input v-model="cjjeValue[1]" placeholder="0" style="width: 7rem;" class="sliderInput"
											@input="changeNumCjje1">
										</el-input>
										<el-button type="primary" style="padding: 0.5rem;" @click="lastCjjeJia">+</el-button>
									</div>
								</li>
								<!-- <li style="margin-top: -1rem; height: 1rem; margin-left: 2rem;">
									<el-button type="primary" @click="onSearchCj(this,8)">筛选成交金额(单位：万)</el-button>
								</li> -->
							</ul>
						</div>
						<div class="twoSXone">
							<ul style="list-style: none;">
								<li title="换手(%)">换手(%):&nbsp;&nbsp;&nbsp;
								</li>
								<li>
									<div style="float: left;">
										<el-button type="primary" style="padding: 0.5rem;" @click="firstHsJian">-</el-button>
										<el-input v-model="hsValue[0]" placeholder="0" style="width: 7rem;" class="sliderInput"
											@input="changeNumHs">
										</el-input>
										<el-button type="primary" style="padding: 0.5rem;" @click="firstHsJia">+</el-button>
									</div>
									<div style="width: 21rem;float: left;margin-left: 1rem;margin-top: -0.5rem;">
										<el-slider v-model="hsValue" range :max="100" :step="5" id="range">
										</el-slider>
									</div>
									<div style="float: left;margin-left: 1rem;">
										<el-button type="primary" style="padding: 0.5rem;" @click="lastHsJian">-</el-button>
										<el-input v-model="hsValue[1]" placeholder="0" style="width: 7rem;" class="sliderInput"
											@input="changeNumHs1">
										</el-input>
										<el-button type="primary" style="padding: 0.5rem;" @click="lastHsJia">+</el-button>
									</div>
								</li>
							</ul>
						</div>
						<div class="twoSXone">
							<ul style="list-style: none;">
								<li title="开板次数">开板次数:&nbsp;&nbsp;&nbsp;
								</li>
								<li>
									<div style="float: left;">
										<el-button type="primary" style="padding: 0.5rem;" @click="firstKbcsJian">-</el-button>
										<el-input v-model="kbcsValue[0]" placeholder="0" style="width: 7rem;" class="sliderInput"
											@input="changeNumKbcs">
										</el-input>
										<el-button type="primary" style="padding: 0.5rem;" @click="firstKbcsJia">+</el-button>
									</div>
									<div style="width: 21rem;float: left;margin-left: 1rem;margin-top: -0.5rem;">
										<el-slider v-model="kbcsValue" range :max="500" :step="5" id="range">
										</el-slider>
									</div>
									<div style="float: left;margin-left: 1rem;">
										<el-button type="primary" style="padding: 0.5rem;" @click="lastKbcsJian">-</el-button>
										<el-input v-model="kbcsValue[1]" placeholder="0" style="width: 7rem;" class="sliderInput"
											@input="changeNumKbcs1">
										</el-input>
										<el-button type="primary" style="padding: 0.5rem;" @click="lastKbcsJia">+</el-button>
									</div>
								</li>
							</ul>
						</div>
						<div class="twoSXone">
							<el-button style="float: right; margin-right:1rem;" type="primary" @click="determine()">确认筛选
							</el-button>
						</div>
					</el-popover>

					<div v-popover:popover @click="showPopover"
						style="color: white;font-size: 1.6rem;text-decoration: underline; cursor: pointer;width: 10rem;margin: 1rem auto;">
						更多筛选数据</div>
				</div>
				<div class="bodyLeft">
					<div class="table-responsive" style="height: 60rem;">
						<el-table class="firstTable" @row-click="showKLine" ref="filterMRZTTable" height="100%" id="limituptable"
							:data="mrztTableData" style="font-size:12px;">
							<el-table-column min-width=90 prop="local_date" label="日期" sortable column-key="date"></el-table-column>
							<el-table-column min-width=90 label="代码/名称"><template slot-scope="scope">
									<div v-html="scope.row.stock_code_name"></div>
								</template></el-table-column>
							<el-table-column min-width=60 prop="lb_count" label="连板" sortable></el-table-column>
							<el-table-column min-width=65 prop="zt_time" label="首次" sortable></el-table-column>
							<el-table-column min-width=65 prop="last_zttime" label="最后" sortable></el-table-column>
							<el-table-column min-width=90 prop="theme" label="题材"></el-table-column>
							<el-table-column min-width=60 prop="price" label="价格" sortable></el-table-column>
							<el-table-column min-width=60 prop="precent" label="涨幅" sortable>
								<template slot-scope="scope">
									<div title="涨幅" v-html="scope.row.precent_html"></div>
								</template>
							</el-table-column>
							<el-table-column min-width=90 prop="amount" label="成交金额" sortable :sort-method="amountSort">
							</el-table-column>
							<el-table-column min-width=60 prop="tor" label="换手" sortable></el-table-column>
							<el-table-column min-width=70 prop="fcb" label="封成比" sortable></el-table-column>
							<el-table-column min-width=90 prop="fbamount" label="封单金额" sortable :sort-method="fbamountSort">
							</el-table-column>
							<el-table-column min-width=90 prop="stock_open" label="开板次数" sortable></el-table-column>
							<el-table-column min-width=90 prop="ltsz" label="流通市值" sortable :sort-method="ltszSort">
							</el-table-column>
							<el-table-column min-width=60 label="次开" sortable :sort-method="nextOpenPercentSort"><template
									slot-scope="scope">
									<div title="次日开盘涨幅" v-html="scope.row.next_open_percent_html"></div>
								</template></el-table-column>
							<el-table-column min-width=60 label="次高" sortable>
								<template slot-scope="scope">
									<div title="次日盘中最高涨幅" v-html="scope.row.next_high_percent_html"></div>
								</template>
							</el-table-column>
							<el-table-column min-width=60 label="次收" sortable :sort-method="nextClosePercentSort">
								<template slot-scope="scope">
									<div title="次日收盘涨幅" v-html="scope.row.next_close_percent_html"></div>
								</template></el-table-column>
							<el-table-column min-width=50 prop="lhb" label="龙虎榜"><template slot-scope="scope">
									<el-button style="padding:5px;" size="mini" @click="showLHB(scope.$index, scope.row)">查看</el-button>
								</template></el-table-column>
						</el-table>
					</div>
					<div style="color: white; font-size: 1.6rem;">
						<!-- <el-button @click="abcd()">删除</el-button> -->
						<!-- v-popover:popover5 -->
						<i class="el-icon-star-on"></i>
						次日开盘高开概率(%)：
						<span :style="{'color':(highOpen>0?'red':'green')}"
							class="highOpen">{{highOpen}}</span>，&nbsp;&nbsp;次日收盘上涨概率(%)：
						<span :style="{'color':(rise>0?'red':'green')}">{{rise}}</span>
					</div>
					<div style="margin-top:5px;color: white;font-size: 1.6rem;">
						<i class="el-icon-star-on"></i>
						次日开盘平均涨幅(%)：
						<span :style="{'color':(openAverage>0?'red':'green')}">{{openAverage}}</span>，
						&nbsp;&nbsp;次日盘中最高平均涨幅(%)：
						<span :style="{'color':(next_high_percent>0?'red':'green')}">{{next_high_percent}}</span>，
						&nbsp;&nbsp;次日收盘平均涨幅(%)：
						<span :style="{'color':(closeAverage>0?'red':'green')}">{{closeAverage}}</span>
					</div>
					<el-dialog title="龙虎榜" :visible.sync="lhbDialogVisible" center>
						<el-container>
							<el-aside width="25rem">
								<el-menu class="el-menu-vertical-demo" @select="selectMenuItem">
									<template v-for="(lhbItem, lhbIndex) in lhbDatas">
										<el-menu-item v-bind:index="lhbIndex">
											<p class="item-left">{{lhbItem.reason}}</p>
											<p class="item-right">{{lhbItem.date}}</p>
										</el-menu-item>
									</template>
								</el-menu>
							</el-aside>
							<el-container>
								<el-header>
									<h3>{{lhbData.name}} ({{lhbData.code}})</h3>
								</el-header>

								<el-main>
									<h3 style="padding: 10px;">[ {{lhbData.date}} ] 上榜类型：{{lhbData.reason}}</h3>
									<el-card class="box-card">
										<h4>买入金额最大的前五名</h4>
										<el-table :data="lhbData.buy_seat" style="width: 100%">
											<el-table-column prop="seat" label="机构名称" width="360">
											</el-table-column>
											<el-table-column class-name="red-color" align="center" prop="bamount" label="买入(万)" width="80">
											</el-table-column>
											<el-table-column class-name="green-color" align="center" prop="samount" label="卖出(万)" width="80">
											</el-table-column>
											<el-table-column class-name="red-color" align="center" prop="net_amount" label="净额(万)" width="80">
											</el-table-column>
											<el-table-column align="center" prop="bamount" label="持有预估(万)" width="110">
											</el-table-column>
										</el-table>
									</el-card>
									<el-card class="box-card">
										<h4>卖出金额最大的前五名</h4>
										<el-table :data="lhbData.sell_seat" style="width: 100%">
											<el-table-column prop="seat" label="机构名称" width="360">
											</el-table-column>
											<el-table-column class-name="red-color" align="center" prop="bamount" label="买入(万)" width="80">
											</el-table-column>
											<el-table-column class-name="green-color" align="center" prop="samount" label="卖出(万)" width="80">
											</el-table-column>
											<el-table-column class-name="green-color" align="center" prop="net_amount" label="净额(万)"
												width="80">
											</el-table-column>
											<el-table-column align="center" prop="bamount" label="持有预估(万)" width="110">
											</el-table-column>
										</el-table>
									</el-card>
									<h3 style="padding-top: 20px;padding-left: 10px;">
										合计: 买入总计: <span class="red-color">{{lhbData.bamount | numFilter}} 万元</span>, 卖出总计: <span
											class="green-color">{{lhbData.samount | numFilter}}
											万元</span>, 买卖总净差: <span class="black-color">{{lhbData.net_amount | numFilter}} 万元</span>
									</h3>
								</el-main>
							</el-container>
						</el-container>
					</el-dialog>

				</div>
				<div class="bodyRight" style="color: white;">
					<template>
						<el-tabs v-model="activeName" type="border-card">
							<el-tab-pane label="K线图" name="kline">
								<div id="brokenKLine"></div>
							</el-tab-pane>
							<el-tab-pane label="涨停分析" name="ztfx">
								<div id="ztfx">
									<el-container>
										<el-aside width="120px">
											<el-timeline>
												<el-timeline-item v-for="(ztfxData, index) in ztfxDatas" :key="index">
													<span v-bind:data-index="index">{{ztfxData.date}}</span>
												</el-timeline-item>
											</el-timeline>
										</el-aside>
										<el-main>
											<div id="ztfx-detail">
												<h3 v-if="ztfxData.name"
													v-text=" ztfxData.name + ' ( ' + ztfxData.code + ' ) ' + ' [ ' + ztfxData.date + ' ] '"></h3>
												<p v-if="ztfxData.ztfx" v-for="item in ztfxData.ztfx">
													<b>来源：{{item.source}} 类型：{{item.type}}</b> <br>
													{{item.detail}}
												</p>
											</div>
										</el-main>
									</el-container>
								</div>
							</el-tab-pane>
						</el-tabs>
					</template>
				</div>
			</div>
			<!-- 涨停统计查询 -->
			<div id="converTwo" class="tab-pane active" style="color: white;">
				<div class="navClass">
					<ul>&nbsp;
						<li>起始日期:&nbsp;&nbsp;&nbsp;
							<el-date-picker name="zttj-start" value-format="yyyy-MM-dd" size='small' style="width: 11rem;"
								v-model="start1" type="date" :picker-options="{
								disabledDate(time) {
									return time.getTime() > Date.now() || time.getDay() == 0 || time.getDay() == 6;
								},
							}" placeholder="选择日期">
							</el-date-picker>
						</li>
						<li>结束日期:&nbsp;&nbsp;&nbsp;
							<el-date-picker name="zttj-end" value-format="yyyy-MM-dd" size='small' style="width: 11rem;"
								v-model="end1" type="date" :picker-options="{
								disabledDate(time) {
									return time.getTime() > Date.now() || time.getDay() == 0 || time.getDay() == 6;
								},
							}" placeholder="选择日期">
							</el-date-picker>
						</li>
						<li style="margin-left: 3rem;"><button id="zttj-query" style="width: 7rem; margin-top: -.5rem;"
								class="btn btn-primary" @click="zttjQuery()">查询</button></li>
					</ul>
				</div>
				<div class="bodyAll">
					<div class="table-responsive">
						<el-table class="lastTable" ref="filterZTTJTable" width="100%" height="800" :data="zttjTableData"
							@cell-click="changFun">
							<el-table-column min-width=90 prop="date" label="日期" sortable column-key="date"></el-table-column>
							<el-table-column min-width=80 prop="zt_sum" label="涨停总数" sortable></el-table-column>
							<el-table-column min-width=80 prop="allLb" label="连板总数" sortable></el-table-column>
							<el-table-column min-width=70 prop="yzb_sum" label="一字板" sortable></el-table-column>
							<el-table-column min-width=70 prop="lb_2_sum" label="二连板" sortable @cell-click="changFun">
							</el-table-column>
							<el-table-column min-width=70 prop="lb_3_sum" label="三连板" sortable @cell-click="changFun">
							</el-table-column>
							<el-table-column min-width=70 prop="lb_4_sum" label="四连板" sortable @cell-click="changFun">
							</el-table-column>
							<el-table-column min-width=95 prop="lb_GTR5_sum" label="五连板以上" sortable></el-table-column>
							<el-table-column min-width=80 prop="zt_0925" label="9:25涨停" sortable @cell-click="changFun">
							</el-table-column>
							<el-table-column min-width=70 prop="fb_1000" label="10点前" sortable @cell-click="changFun">
							</el-table-column>
							<el-table-column min-width=105 prop="fb_1000_1130" label="10:00-11:30" sortable @cell-click="changFun">
							</el-table-column>
							<el-table-column min-width=105 prop="fb_13_14" label="13:00-14:00" sortable @cell-click="changFun">
							</el-table-column>
							<el-table-column min-width=105 prop="fb_14_15" label="14:00-15:00" sortable @cell-click="changFun">
							</el-table-column>
							<el-table-column min-width=70 prop="pb_sum" label="开板数" sortable></el-table-column>
							<el-table-column min-width=70 prop="fb_precentage" label="封板率" sortable></el-table-column>
							<el-table-column min-width=110 prop="yje" label="一进二连板率" :formatter="toPercenterNumber" sortable>
							</el-table-column>
							<el-table-column min-width=110 prop="ejs" label="二进三连板率" :formatter="toPercenterNumber" sortable>
							</el-table-column>
							<el-table-column min-width=70 prop="lbl" label="连板率" :formatter="toPercenterNumber" sortable>
							</el-table-column>
							<el-table-column min-width=95 prop="zrlbl" label="昨日连板率" :formatter="toPercenterNumber" sortable>
							</el-table-column>
							<el-table-column min-width=120 prop="total_money" label="涨停总金额(亿)" sortable></el-table-column>
							<el-table-column min-width=80 prop="sh_index_amount" label="上证(亿)" sortable></el-table-column>
							<el-table-column min-width=95 prop="star_index_amount" label="科创板(亿)" sortable></el-table-column>
						</el-table>
					</div>
				</div>
			</div>
		</div>
	</div>
</body>
<script src="js/echarts.min.js"></script>
<script src="js/vue.min.js" type="text/javascript" charset="utf-8"></script>
<script src="js/element.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
	let AllAppData = []; // 点击查询数据按钮表格数据
	let filterArray = [];// 筛选过后的数组
	var Main = {
		filters: {
			numStringFilter(value) {
				// 截取当前数据到小数点后两位
				return parseFloat(value).toFixed(2);
			},
			numFilter(value) {
				// 截取当前数据到小数点后两位
				return Number(value).toFixed(2);
			},
		},
		mounted() {
			// console.log(Main)
		},
		methods: {
			//二级筛选
			//连板数 输入值转换类型以及input监听
			changeNumLbs(value) {
				this.lbsValue[0] = value;
				this.lbsValue = [value * 1, this.lbsValue[1]]
			},
			//连板数 输入值转换类型以及input监听
			changeNumLbs1(value) {
				this.lbsValue[1] = value;
				this.lbsValue = [this.lbsValue[0], value * 1]
			},
			//流通市值 输入值转换类型以及input监听
			changeNumLtsz(value) {
				this.ltszValue[0] = value;
				this.ltszValue = [value * 1, this.ltszValue[1]]
			},
			//流通市值 输入值转换类型以及input监听
			changeNumLtsz1(value) {
				this.ltszValue[1] = value;
				this.ltszValue = [this.ltszValue[0], value * 1]
			},
			//成交金额 输入值转换类型以及input监听
			changeNumCjje(value) {
				this.cjjeValue[0] = value;
				this.cjjeValue = [value * 1, this.cjjeValue[1]]
			},
			//成交金额 输入值转换类型以及input监听
			changeNumCjje1(value) {
				this.cjjeValue[1] = value;
				this.cjjeValue = [this.cjjeValue[0], value * 1]
			},
			changeNumHs(value) {
				this.hsValue[0] = value;
				this.hsValue = [value * 1, this.hsValue[1]]
			},
			changeNumHs1(value) {
				this.hsValue[1] = value;
				this.hsValue = [this.hsValue[0], value * 1]
			},
			changeNumKbcs(value) {
				this.kbcsValue[0] = value;
				this.kbcsValue = [value * 1, this.kbcsValue[1]]
			},
			changeNumKbcs1(value) {
				this.kbcsValue[1] = value;
				this.kbcsValue = [this.kbcsValue[0], value * 1]
			},
			// 确认筛选
			determine() {
				this.visible2 = false;
				filterArray = AllAppData;
				// console.log(filterArray)
				if (AllAppData.length == 0) {
					alert("暂无数据，请查询历史数据后再进行此操作。")
				} else {
					let loading = this.$loading({
						lock: true,
						text: '正在筛选数据 请稍后...',
						spinner: 'el-icon-loading',
						background: 'rgba(0, 0, 0, 0.7)'
					});
					if (this.firstZt_time) {
						filterArray = filterArray.filter((df) => {
							return df.zt_time >= this.firstZt_time;
						});
					}
					// console.log(filterArray, "1")
					if (this.firstZt_time1) {
						filterArray = filterArray.filter((df) => {
							return df.zt_time <= this.firstZt_time1;
						});
					}
					// console.log(filterArray)
					if (this.lastZt_time) {
						filterArray = filterArray.filter((df) => {
							return df.last_zttime >= this.lastZt_time;
						});
					}
					// console.log(filterArray)
					if (this.lastZt_time1) {
						filterArray = filterArray.filter((df) => {
							return df.last_zttime <= this.lastZt_time1;
						});
					}
					// console.log(filterArray)
					if (this.lbsValue) {
						filterArray = filterArray.filter((df) => {
							return df.lb_count >= this.lbsValue[0] && df.lb_count <= this.lbsValue[1];
						});
					}
					// console.log(filterArray)
					if (this.ltszValue) {
						filterArray = filterArray.filter((df) => {
							return ziToNumber(df.ltsz) >= this.ltszValue[0] * 100000000 && ziToNumber(df.ltsz) <= this.ltszValue[1] * 100000000;
						});
					}
					// console.log(filterArray)
					if (this.cjjeValue) {
						filterArray = filterArray.filter((df) => {
							return ziToNumber(df.amount) >= this.cjjeValue[0] * 10000 && ziToNumber(df.amount) <= this.cjjeValue[1] * 10000;
						});
					}
					if (this.hsValue) {
						filterArray = filterArray.filter((df) => {
							return df.tor >= this.hsValue[0] && df.tor <= this.hsValue[1];
						});
					}
					if (this.kbcsValue) {
						filterArray = filterArray.filter((df) => {
							return df.stock_open >= this.kbcsValue[0] && df.stock_open <= this.kbcsValue[1];
						});
					}
					// console.log(filterArray)
					App.mrztTableData = filterArray;
					loading.close();
				}
			},
			// 点击更多筛选 把数据放进去。
			showPopover() {
				filterArray = AllAppData;
			},
			// //连板数
			// onSearchLb(value) {
			// 	console.log(value)
			// 	this.lbsValue = value;
			// 	filterArray = filterArray.filter(function (df) {
			// 		return df.lb_count >= value[0] && df.lb_count <= value[1];
			// 	});
			// },
			//连扳数加减
			firstLbsJian() {
				var first = this.lbsValue[0] * 1;
				first -= 1;
				this.lbsValue = [first, this.lbsValue[1]];
			},
			firstLbsJia() {
				var first = this.lbsValue[0] * 1
				first += 1;
				this.lbsValue = [first, this.lbsValue[1]];
			},
			lastLbsJian() {
				var last = this.lbsValue[1] * 1
				last -= 1;
				this.lbsValue = [this.lbsValue[0], last];
			},
			lastLbsJia() {
				var last = this.lbsValue[1] * 1
				last += 1;
				this.lbsValue = [this.lbsValue[0], last];
			},
			// //流通市值
			// onSearchLt(value) {
			// 	this.ltszValue = value;
			// 	filterArray = filterArray.filter(function (df) {
			// 		return df.ltsz >= value[0] && df.ltsz <= value[1];
			// 	});
			// },
			//流通市值加减
			firstLtszJian() {
				var first = this.ltszValue[0];
				first -= 5;
				this.ltszValue = [first, this.ltszValue[1]];
			},
			firstLtszJia() {
				var first = this.ltszValue[0]
				first += 5;
				this.ltszValue = [first, this.ltszValue[1]];
			},
			lastLtszJian() {
				var last = this.ltszValue[1]
				last -= 5;
				this.ltszValue = [this.ltszValue[0], last];
			},
			lastLtszJia() {
				var last = this.ltszValue[1]
				last += 5;
				this.ltszValue = [this.ltszValue[0], last];
			},
			//成交金额
			// onSearchCj(value) {
			// 	console.log(value)
			// 	this.cjjeValue = value;
			// 	filterArray = filterArray.filter(function (df) {
			// 		console.log(ziToNumber(df.amount) >= value[0] * 10000 && ziToNumber(df.amount) <= value[1] * 10000);
			// 		return ziToNumber(df.amount) >= value[0] * 10000 && ziToNumber(df.amount) <= value[1] * 10000;
			// 	});
			// },
			//成交金额加减
			firstCjjeJian() {
				var first = this.cjjeValue[0];
				first -= 1000;
				this.cjjeValue = [first, this.cjjeValue[1]];
			},
			firstCjjeJia() {
				var first = this.cjjeValue[0]
				first += 1000;
				this.cjjeValue = [first, this.cjjeValue[1]];
			},
			lastCjjeJian() {
				var last = this.cjjeValue[1]
				last -= 1000;
				this.cjjeValue = [this.cjjeValue[0], last];
			},
			lastCjjeJia() {
				var last = this.cjjeValue[1]
				last += 1000;
				this.cjjeValue = [this.cjjeValue[0], last];
			},
			//换手加减
			firstHsJian() {
				var first = this.hsValue[0];
				first -= 5;
				this.hsValue = [first, this.hsValue[1]];
			},
			firstHsJia() {
				var first = this.hsValue[0]
				first += 5;
				this.hsValue = [first, this.hsValue[1]];
			},
			lastHsJian() {
				var last = this.hsValue[1]
				last -= 5;
				this.hsValue = [this.hsValue[0], last];
			},
			lastHsJia() {
				var last = this.hsValue[1]
				last += 5;
				this.hsValue = [this.hsValue[0], last];
			},
			//开办次数
			firstKbcsJian() {
				var first = this.kbcsValue[0];
				first -= 5;
				this.kbcsValue = [first, this.kbcsValue[1]];
			},
			firstKbcsJia() {
				var first = this.kbcsValue[0]
				first += 5;
				this.kbcsValue = [first, this.kbcsValue[1]];
			},
			lastKbcsJian() {
				var last = this.kbcsValue[1]
				last -= 5;
				this.kbcsValue = [this.kbcsValue[0], last];
			},
			lastKbcsJia() {
				var last = this.kbcsValue[1]
				last += 5;
				this.kbcsValue = [this.kbcsValue[0], last];
			},
			//涨停统计查询跳转到每日涨停查询
			changFun(row, column, cell, event) {
				// console.log(row, column)
				if (column.label == "二连板") {
					console.log("点击二连板的console.log")
					this.start = row.date
					this.end = row.date
					this.lb_count_value = 2; // 因为已有条件 直接连板写死即可。 
					this.jumpData()
					var firstTime = $('[name="mrzt-start"]').val()
					var endTime = $('[name="mrzt-end"]').val()
					firstTime = this.start;
					endTime = this.end;
					// this.zt_time = ""
					// this.last_zttime = ""
					this.zdjumpAjaxData() // 涨停查询的按钮方法
				} else if (column.label == "三连板") {
					console.log("点击三连板的console.log")
					this.start = row.date
					this.end = row.date
					this.lb_count_value = 3; // 因为已有条件 直接连板写死即可。 
					this.jumpData()
					var firstTime = $('[name="mrzt-start"]').val()
					var endTime = $('[name="mrzt-end"]').val()
					firstTime = this.start;
					endTime = this.end;
					// this.zt_time = ""
					// this.last_zttime = ""
					this.zdjumpAjaxData() // 涨停查询的按钮方法
				} else if (column.label == "四连板") {
					console.log("点击四连板的console.log")
					this.start = row.date
					this.end = row.date
					this.lb_count_value = 4; // 因为已有条件 直接连板写死即可。 
					this.jumpData()
					var firstTime = $('[name="mrzt-start"]').val()
					var endTime = $('[name="mrzt-end"]').val()
					firstTime = this.start;
					endTime = this.end;
					// this.zt_time = ""
					// this.last_zttime = ""
					this.zdjumpAjaxData() // 涨停查询的按钮方法
				} else if (column.label == "9:25涨停") {
					// console.log("点击9:25涨停")
					this.start = row.date
					this.end = row.date
					this.jumpData()
					var firstTime = $('[name="mrzt-start"]').val()
					var endTime = $('[name="mrzt-end"]').val()
					firstTime = this.start;
					endTime = this.end;
					this.zdjumpAjaxData() // 涨停查询的按钮方法
					this.firstZt_time = "09:25:00"
					this.firstZt_time1 = "09:25:00"
					this.lastZt_time = ""
					this.lastZt_time1 = ""
					this.lb_count_value = ""; // 写为空。 
					setTimeout(() => {
						this.determine() // 二级筛选确定筛选按钮
					}, 500);
				} else if (column.label == "10点前") {
					// console.log("点击10点前")
					this.start = row.date
					this.end = row.date
					this.jumpData()
					var firstTime = $('[name="mrzt-start"]').val()
					var endTime = $('[name="mrzt-end"]').val()
					firstTime = this.start;
					endTime = this.end;
					this.zdjumpAjaxData() // 涨停查询的按钮方法
					this.firstZt_time = "09:25:00"
					this.firstZt_time1 = "10:00:00"
					this.lastZt_time = "09:25:00"
					this.lastZt_time1 = "10:00:00"
					this.lb_count_value = ""; // 写为空。
					setTimeout(() => {
						this.determine() // 二级筛选确定筛选按钮
					}, 500);
				} else if (column.label == "10:00-11:30") {
					// console.log("点击10:00-11:30")
					this.start = row.date
					this.end = row.date
					this.jumpData()
					var firstTime = $('[name="mrzt-start"]').val()
					var endTime = $('[name="mrzt-end"]').val()
					firstTime = this.start;
					endTime = this.end;
					this.zdjumpAjaxData() // 涨停查询的按钮方法
					this.firstZt_time = "10:00:00"
					this.firstZt_time1 = "11:30:00"
					this.lastZt_time = "10:00:00"
					this.lastZt_time1 = "11:30:00"
					this.lb_count_value = ""; // 写为空。
					setTimeout(() => {
						this.determine() // 二级筛选确定筛选按钮
					}, 500);
				} else if (column.label == "13:00-14:00") {
					// console.log("点击13:00-14:00")
					this.start = row.date
					this.end = row.date
					this.jumpData()
					var firstTime = $('[name="mrzt-start"]').val()
					var endTime = $('[name="mrzt-end"]').val()
					firstTime = this.start;
					endTime = this.end;
					this.zdjumpAjaxData() // 涨停查询的按钮方法
					this.firstZt_time = "13:00:00"
					this.firstZt_time1 = "14:00:00"
					this.lastZt_time = "13:00:00"
					this.lastZt_time1 = "14:00:00"
					this.lb_count_value = ""; // 写为空。
					setTimeout(() => {
						this.determine() // 二级筛选确定筛选按钮
					}, 500);
				} else if (column.label == "14:00-15:00") {
					// console.log("点击14:00-15:00")
					this.start = row.date
					this.end = row.date
					this.jumpData()
					var firstTime = $('[name="mrzt-start"]').val()
					var endTime = $('[name="mrzt-end"]').val()
					firstTime = this.start;
					endTime = this.end;
					this.zdjumpAjaxData() // 涨停查询的按钮方法
					this.firstZt_time = "14:00:00"
					this.firstZt_time1 = "15:00:00"
					this.lastZt_time = "14:00:00"
					this.lastZt_time1 = "15:00:00"
					this.lb_count_value = ""; // 写为空。
					setTimeout(() => {
						this.determine() // 二级筛选确定筛选按钮
					}, 500);
				}
			},
			jumpData() {
				$('#myTab a:first').tab('show');
				$('#myTab a:first').parent().addClass('backgroundRed').siblings().removeClass('backgroundRed')
			},
			amountSort(front, end) {
				return ziToNumber(front.amount) - ziToNumber(end.amount);
			},
			ltszSort(front, end) {
				return ziToNumber(front.ltsz) - ziToNumber(end.ltsz);
			},
			fbamountSort(front, end) {
				return ziToNumber(front.fbamount) - ziToNumber(end.fbamount);
			},
			toPercenterNumber(row, column, cellValue, index) {
				return Number(cellValue * 100).toFixed(2) + "%";
			},
			showKLine(row, column, event) {
				loadKLine(row);
				loadZTFX(row);
			},
			nextOpenPercentSort(front, end) {
				return front.next_open_percent - end.next_open_percent;
			},
			nextClosePercentSort(front, end) {
				return front.next_close_percent - end.next_close_percent;
			},
			selectMenuItem(index, indexPath) {
				updateLHBData(index, "123456");
			},
			formatter(row, column) {
				return row.address;
			},
			filterTag(value, row) {
				return row.tag === value;
			},
			// 自动查询
			zdjumpAjaxData() {
				var firstTime = $('[name="mrzt-start"]').val()
				var endTime = $('[name="mrzt-end"]').val()
				firstTime = this.start;
				endTime = this.end;
				let mrzt = ztfpURL + "/mrzt?start=" + firstTime + "&end=" + endTime;
				let lb_count = $('[name="lb_count"]').val();
				lb_count = this.lb_count_value
				// let zt_time = $('[name="zt_time"]').val();
				// zt_time = this.zt_time
				// let last_zttime = $('[name="last_zttime"]').val();
				// last_zttime = this.last_zttime
				let amount = $('[name="amount"]').val();
				// let tor = $('[name="tor"]').val();
				// let stock_open = $('[name="stock_open"]').val();
				// let ltsz = $('[name="ltsz"]').val();

				let otherParamCount = 0;
				if (lb_count) {
					otherParamCount++;
					mrzt += "&lb_count=" + lb_count;
				}
				// if (zt_time) {
				// 	otherParamCount++;
				// 	mrzt += "&zt_time=" + zt_time;
				// }
				// if (last_zttime) {
				// 	otherParamCount++;
				// 	mrzt += "&last_zttime=" + last_zttime;
				// }
				if (amount) {
					otherParamCount++;
					mrzt += "&amount=" + amount;
				}
				// if (tor) {
				// 	otherParamCount++;
				// 	mrzt += "&tor=" + tor;
				// }
				// if (stock_open) {
				// 	otherParamCount++;
				// 	mrzt += "&stock_open=" + stock_open;
				// }
				// if (ltsz) {
				// 	otherParamCount++;
				// 	mrzt += "&ltsz=" + parseFloat(ltsz) * 10000;
				// }

				if (otherParamCount > 3) {
					alert('除开始时间和结束时间外，其他查询字段最多只再能选择3个组合查询。');
					resetAppData();
				}

				$.ajax({
					type: "post",
					url: mrzt,
					data: {},
					success: function (res) {
						console.log(res)
						if (res.code == 200) {
							if (res.data.length == 0) {
								alert('当前的筛选条件下没有数据。');
							}
							for (let i = 0; i < res.data.length; i++) {
								// res.data[i].zt_time = res.data[i].zt_time.substr(0, 5);
								// res.data[i].last_zttime = res.data[i].last_zttime.substr(0, 5);
								res.data[i].amount = numberToZi(res.data[i].amount * 10000);
								res.data[i].fbamount = numberToZi(res.data[i].fbamount * 10000);
								res.data[i].ltsz = numberToZi(res.data[i].ltsz * 10000);
								res.data[i].stock_code_name = res.data[i].stock_code + "<br>" + res.data[i].stock_name;
								res.data[i].fcb = res.data[i].fcb.toFixed(2)
								if (parseFloat(res.data[i].precent) >= 0) {
									res.data[i].precent_html = "<span style='color:red;'>" + res.data[i].precent + "</span>";
								} else {
									res.data[i].precent_html = "<span style='color:green;'>" + res.data[i].precent + "</span>";
								}
								if (parseInt(res.data[i].next_open_percent) <= -98) {
									res.data[i].next_open_percent_html = "-";
								} else if (res.data[i].next_open_percent > 0) {
									res.data[i].next_open_percent_html = "<span style='color:red;'>" + res.data[i].next_open_percent +
										"</span>";
								} else {
									res.data[i].next_open_percent_html = "<span style='color:green;'>" + res.data[i].next_open_percent +
										"</span>";
								}
								if (parseInt(res.data[i].next_high_percent) <= -98) {
									res.data[i].next_high_percent_html = "-";
								} else if (res.data[i].next_high_percent > 0) {
									res.data[i].next_high_percent_html = "<span style='color:red;'>" + res.data[i].next_high_percent +
										"</span>";
								} else {
									res.data[i].next_high_percent_html = "<span style='color:green;'>" + res.data[i].next_high_percent +
										"</span>";
								}
								if (parseInt(res.data[i].next_close_percent) <= -98) {
									res.data[i].next_close_percent_html = "-";
								} else if (res.data[i].next_close_percent > 0) {
									res.data[i].next_close_percent_html = "<span style='color:red;'>" + res.data[i].next_close_percent +
										"</span>";
								} else {
									res.data[i].next_close_percent_html = "<span style='color:green;'>" + res.data[i].next_close_percent +
										"</span>";
								}
							}
							App.mrztTableData = res.data;
							AllAppData = App.mrztTableData;
							App.AllBingo = res.data.length;
							// 次开平均---------
							var rateRetNum = 0;// 全部有效次日长度
							var mub = 0;// 数据总长度
							var subOpen = 0;// 大于0的长度
							var allMubOpen = 0;// 大于0的长度 / 总长度
							// 次高平均
							var highPercent = 0;
							var allHigh = 0;
							// 次收平均-----------
							var subClose = 0;// 大于0的长度
							var allMubClose = 0;// 大于0的长度 / 总长度
							var justRateOpen = 0;// 正 次开
							var justRateClose = 0;// 正 次收
							for (var j = 0; j < res.data.length; j++) {
								if (parseFloat(res.data[j].next_open_percent) > -11) {
									subOpen += res.data[j].next_open_percent;
								}
								if (parseFloat(res.data[j].next_close_percent) > -11) {
									subClose += res.data[j].next_close_percent;
								}
								if (parseFloat(res.data[j].next_open_percent) >= 0) {
									justRateOpen = justRateOpen + 1;
								}
								if (parseFloat(res.data[j].next_close_percent) >= 0) {
									justRateClose = justRateClose + 1;
								}
								if (parseFloat(res.data[j].next_open_percent) > -11 && parseFloat(res.data[j].next_close_percent) > -11) {
									rateRetNum = rateRetNum + 1
								}
								if (parseFloat(res.data[j].next_high_percent) > -11) {
									highPercent += res.data[j].next_high_percent
									// console.log(highPercent)
								}
							}
							mub = res.data.length;
							allMubOpen = (subOpen / 100) / rateRetNum;
							allMubClose = (subClose / 100) / rateRetNum;
							allHigh = (highPercent / 100) / rateRetNum;
							var justOp = ((justRateOpen / rateRetNum) * 100).toFixed(2)
							var justCl = ((justRateClose / rateRetNum) * 100).toFixed(2)
							// console.log(allHigh)
							if (rateRetNum == 0) {
								App.openAverage = "暂无次日数据"
								App.closeAverage = "暂无次日数据"
								App.highOpen = "暂无次日数据"
								App.rise = "暂无次日数据"
								App.next_high_percent = "暂无次日数据"
							} else {
								App.openAverage = (allMubOpen * 100).toFixed(2)//平均次开
								App.closeAverage = (allMubClose * 100).toFixed(2)//平均次开
								App.highOpen = justOp  //次开高概率
								App.rise = justCl  //次开高概率
								App.next_high_percent = (allHigh * 100).toFixed(2) //平均次高
							}
						} else if (res.code == -100) {
							alert(res.message);
							window.location.href = "http://www.wuylh.com/zthelper/ztindex.jsp";
						}
					},
					error: function (err) {
						console.log(err);
						alert('网络请求失败，请检查网络，稍后再重新连接');
					}
				});
			},
			// 每日查询
			jumpAjaxData() {
				// $('#mrzt-query').on('click', function () {
				let mrzt = ztfpURL + "/mrzt?start=" + $('[name="mrzt-start"]').val() + "&end=" + $('[name="mrzt-end"]').val();
				// let mrzt = ztfpURL + "/mrzt?start=" + this.start + "&end=" + this.end;
				let lb_count = $('[name="lb_count"]').val();
				// let zt_time = $('[name="zt_time"]').val();
				// let last_zttime = $('[name="last_zttime"]').val();
				let amount = $('[name="amount"]').val();
				// let tor = $('[name="tor"]').val();
				// let stock_open = $('[name="stock_open"]').val();
				// let ltsz = $('[name="ltsz"]').val();
				let loading = this.$loading({
					lock: true,
					text: '正在加载数据 请稍后...',
					spinner: 'el-icon-loading',
					background: 'rgba(0, 0, 0, 0.7)'
				});
				let otherParamCount = 0;


				if (lb_count) {
					otherParamCount++;
					mrzt += "&lb_count=" + lb_count;
				}
				// if (zt_time) {
				// 	otherParamCount++;
				// 	mrzt += "&zt_time=" + zt_time;
				// }
				// if (last_zttime) {
				// 	otherParamCount++;
				// 	mrzt += "&last_zttime=" + last_zttime;
				// }
				if (amount) {
					otherParamCount++;
					mrzt += "&amount=" + amount;
				}
				// if (tor) {
				// 	otherParamCount++;
				// 	mrzt += "&tor=" + tor;
				// }
				// if (stock_open) {
				// 	otherParamCount++;
				// 	mrzt += "&stock_open=" + stock_open;
				// }
				// if (ltsz) {
				// 	otherParamCount++;
				// 	mrzt += "&ltsz=" + parseFloat(ltsz) * 10000;
				// }

				if (otherParamCount > 3) {
					alert('除开始时间和结束时间外，其他查询字段最多只再能选择3个组合查询。');
					resetAppData();
				}

				$.ajax({
					type: "post",
					url: mrzt,
					data: {},
					success: function (res) {
						console.log(res)
						if (res.code == 200) {
							if (res.data.length == 0) {
								alert('当前的筛选条件下没有数据。');
							}
							for (let i = 0; i < res.data.length; i++) {
								// res.data[i].zt_time = res.data[i].zt_time.substr(0, 5);
								// res.data[i].last_zttime = res.data[i].last_zttime.substr(0, 5);
								res.data[i].amount = numberToZi(res.data[i].amount * 10000);
								res.data[i].fbamount = numberToZi(res.data[i].fbamount * 10000);
								res.data[i].ltsz = numberToZi(res.data[i].ltsz * 10000);
								res.data[i].stock_code_name = res.data[i].stock_code + "<br>" + res.data[i].stock_name;
								res.data[i].fcb = res.data[i].fcb.toFixed(2)
								if (parseFloat(res.data[i].precent) >= 0) {
									res.data[i].precent_html = "<span style='color:red;'>" + res.data[i].precent + "</span>";
								} else {
									res.data[i].precent_html = "<span style='color:green;'>" + res.data[i].precent + "</span>";
								}
								if (parseInt(res.data[i].next_open_percent) <= -98) {
									res.data[i].next_open_percent_html = "-";
								} else if (res.data[i].next_open_percent > 0) {
									res.data[i].next_open_percent_html = "<span style='color:red;'>" + res.data[i].next_open_percent +
										"</span>";
								} else {
									res.data[i].next_open_percent_html = "<span style='color:green;'>" + res.data[i].next_open_percent +
										"</span>";
								}
								if (parseInt(res.data[i].next_high_percent) <= -98) {
									res.data[i].next_high_percent_html = "-";
								} else if (res.data[i].next_high_percent > 0) {
									res.data[i].next_high_percent_html = "<span style='color:red;'>" + res.data[i].next_high_percent +
										"</span>";
								} else {
									res.data[i].next_high_percent_html = "<span style='color:green;'>" + res.data[i].next_high_percent +
										"</span>";
								}
								if (parseInt(res.data[i].next_close_percent) <= -98) {
									res.data[i].next_close_percent_html = "-";
								} else if (res.data[i].next_close_percent > 0) {
									res.data[i].next_close_percent_html = "<span style='color:red;'>" + res.data[i].next_close_percent +
										"</span>";
								} else {
									res.data[i].next_close_percent_html = "<span style='color:green;'>" + res.data[i].next_close_percent +
										"</span>";
								}
							}
							App.mrztTableData = res.data;
							AllAppData = App.mrztTableData;
							App.AllBingo = res.data.length;
							loading.close();
							// 次开平均---------
							var rateRetNum = 0;// 全部有效次日长度
							var mub = 0;// 数据总长度
							var subOpen = 0;// 大于0的长度
							var allMubOpen = 0;// 大于0的长度 / 总长度
							// 次高平均
							var highPercent = 0;
							var allHigh = 0;
							// 次收平均-----------
							var subClose = 0;// 大于0的长度
							var allMubClose = 0;// 大于0的长度 / 总长度
							var justRateOpen = 0;// 正 次开
							var justRateClose = 0;// 正 次收
							for (var j = 0; j < res.data.length; j++) {
								if (parseFloat(res.data[j].next_open_percent) > -11) {
									subOpen += res.data[j].next_open_percent;
								}
								if (parseFloat(res.data[j].next_close_percent) > -11) {
									subClose += res.data[j].next_close_percent;
								}
								if (parseFloat(res.data[j].next_open_percent) >= 0) {
									justRateOpen = justRateOpen + 1;
								}
								if (parseFloat(res.data[j].next_close_percent) >= 0) {
									justRateClose = justRateClose + 1;
								}
								if (parseFloat(res.data[j].next_open_percent) > -11 && parseFloat(res.data[j].next_close_percent) > -11) {
									rateRetNum = rateRetNum + 1
								}
								if (parseFloat(res.data[j].next_high_percent) > -11) {
									highPercent += res.data[j].next_high_percent
								}
							}
							mub = res.data.length;
							allMubOpen = (subOpen / 100) / rateRetNum;
							allMubClose = (subClose / 100) / rateRetNum;
							allHigh = (highPercent / 100) / rateRetNum;
							var justOp = ((justRateOpen / rateRetNum) * 100).toFixed(2)
							var justCl = ((justRateClose / rateRetNum) * 100).toFixed(2)
							// console.log(allHigh)
							if (rateRetNum == 0) {
								App.openAverage = "暂无次日数据"
								App.closeAverage = "暂无次日数据"
								App.highOpen = "暂无次日数据"
								App.rise = "暂无次日数据"
								App.next_high_percent = "暂无次日数据"
							} else {
								App.openAverage = (allMubOpen * 100).toFixed(2);//平均次开
								App.closeAverage = (allMubClose * 100).toFixed(2);//平均次开
								App.highOpen = justOp  //次开高概率
								App.rise = justCl  //次开高概率
								App.next_high_percent = (allHigh * 100).toFixed(2) //平均次高
							}
						} else if (res.code == -100) {
							alert(res.message);
							window.location.href = "http://www.wuylh.com/zthelper/ztindex.jsp";
						}
					},
					error: function (err) {
						console.log(err);
						alert('网络请求失败，请检查网络，稍后再重新连接');
					}
				});
				// });
			},
			// 涨停统计查询按钮
			zttjQuery() {
				let zttj = ztfpURL + "/zttj?start=" + $('[name="zttj-start"]').val() + "&end=" + $('[name="zttj-end"]').val();
				// let allLb = "";
				// console.log(this.allLb)
				let loading = this.$loading({
					lock: true,
					text: '正在加载数据 请稍后...',
					spinner: 'el-icon-loading',
					background: 'rgba(0, 0, 0, 0.7)'
				});

				$.ajax({
					type: "post",
					url: zttj,
					data: {},
					success: function (res) {
						console.log(res, "涨停统计查询")
						if (res.code == 200) {
							if (res.data.length < 2) {
								alert('当前的筛选条件下没有数据。');
							}
							let Allzttj = []
							for (let i = 0; i < res.data.length; i++) {
								var obj = {}
								obj.date = res.data[i].date;
								obj.zt_sum = res.data[i].zt_sum
								obj.allLb = res.data[i].lb_2_sum + res.data[i].lb_3_sum + res.data[i].lb_4_sum + res.data[i].lb_GTR5_sum
								obj.yzb_sum = res.data[i].yzb_sum
								obj.lb_2_sum = res.data[i].lb_2_sum
								obj.lb_3_sum = res.data[i].lb_3_sum
								obj.lb_4_sum = res.data[i].lb_4_sum
								obj.lb_GTR5_sum = res.data[i].lb_GTR5_sum
								obj.zt_0925 = res.data[i].zt_0925
								obj.fb_1000 = res.data[i].fb_1000
								obj.fb_1000_1130 = res.data[i].fb_1000_1130
								obj.fb_13_14 = res.data[i].fb_13_14
								obj.fb_14_15 = res.data[i].fb_14_15
								obj.pb_sum = res.data[i].pb_sum
								obj.fb_precentage = res.data[i].fb_precentage + "%"
								obj.yje = res.data[i].yje
								obj.ejs = res.data[i].ejs
								obj.lbl = res.data[i].lbl
								obj.zrlbl = res.data[i].zrlbl
								obj.total_money = res.data[i].total_money
								obj.sh_index_amount = res.data[i].sh_index_amount
								obj.star_index_amount = res.data[i].star_index_amount
								Allzttj[i] = obj
							}
							App.zttjTableData = Allzttj.splice(1)
							loading.close();
						} else if (res.code == -100) {
							alert(res.message);
							window.location.href = "http://www.wuylh.com/zthelper/ztindex.jsp";
						}
					},
					error: function (err) {
						console.log(err);
						alert('网络请求失败，请检查网络，稍后再重新连接');
					}
				});
			}
		},
		data() {
			return {
				AllBingo: 0,//页面显示数据
				//二级筛选
				ltszValue: [0, 1500],//流通市值
				lbsValue: [0, 10],//连板数
				cjjeValue: [0, 1000000],//成交金额
				hsValue: [0, 100],//换手
				kbcsValue: [0, 500],//开板次数
				//
				ztfxDatas: [],
				ztfxData: {},
				activeName: "kline",
				zttjTableData: [],
				mrztTableData: [],
				lhbDatas: {},
				lhbData: {},
				lhbDialogVisible: false,
				start: new Date(),
				end: new Date(),
				start1: new Date(),
				end1: new Date(),
				// zt_time: '',
				// last_zttime: '',
				// zt_time1: '',
				// last_zttime1: '',
				firstZt_time: '',
				firstZt_time1: '',
				lastZt_time: '',
				lastZt_time1: '',
				amount: '',
				// tor: '',
				// stock_open: '',
				// ltsz: '',
				// ltsz1: '',
				lb_count_options: [{
					value: '0',
					label: '0'
				}, {
					value: '1',
					label: '1'
				}, {
					value: '2',
					label: '2'
				}, {
					value: '3',
					label: '3'
				}, {
					value: '4',
					label: '4'
				}, {
					value: '5',
					label: '5'
				}, {
					value: '6',
					label: '6'
				}, {
					value: '7',
					label: '7'
				}, {
					value: '8',
					label: '8'
				}, {
					value: '9',
					label: '9'
				}],
				lb_count_value: '',
				highOpen: "暂无数据",
				rise: "暂无数据",
				openAverage: "暂无数据",
				closeAverage: "暂无数据",
				next_high_percent: "暂无数据",
				visible2: false,
			};
		}
	}
	var Ctor = Vue.extend(Main);
	var App = new Ctor().$mount('#app');

	function resetAppData() {
		App.start = new Date();
		App.end = new Date();
		// App.zt_time = '';
		// App.last_zttime = '';
		App.amount = '';
		// App.tor = '';
		// App.stock_open = '';
		// App.ltsz = '';
		App.lb_count_value = '';
	}

	//K线图
	let kchart = document.getElementById('brokenKLine');
	$(kchart).css({
		"width": parseInt(document.body.clientWidth * 0.3 - 20)
	});
	// $(".bodyRight").css({
	// 	"height": parseInt(document.body.clientHeight * 0.9 - 20)
	// })
	let myDchart = echarts.init(kchart);
	$(kchart).css({
		"width": "100%"
	});
</script>
<script>
	$(function () {
		$('#myTab a:first').tab('show');
	})
	$('#myTab a').click(function (e) {
		$(this).parent().addClass('backgroundRed').siblings().removeClass('backgroundRed')
		e.preventDefault();
		$(this).tab('show')
	})
</script>
<script src="js/kline.js" type="text/javascript" charset="utf-8"></script>
<script>
	var ztfpURL = 'http://192.168.5.10:8080/lsh/zthelper/ztfp';
	// var ztfpURL = 'http://www.wuylh.com/zthelper/ztfp';
	//

	//
	function showLHB(index, row) {
		// // jsonURL = "/ztreplay/json/lhb_" + row.stock_code + ".json";
		// $.post(jsonURL, {}, function (jsonDatas) {
		// 	// $.getJSON(jsonURL, {}, function(jsonDatas) {
		// 	$("div.table-responsive").find("li.el-menu-item.is-active").removeClass("is-active");
		// 	App.lhbDatas = jsonDatas;
		// 	App.lhbData = updateLHBData(0, row.local_date);
		// 	App.lhbDialogVisible = true;
		// });
		// console.log(123)
		// 加载龙虎榜的数据
		let jsonURL = ztfpURL + "/lhb?code=" + row.stock_code;
		$.ajax({
			url: jsonURL,
			type: 'post',
			data: {},
			success: function (jsonDatas) {
				$("div.table-responsive").find("li.el-menu-item.is-active").removeClass("is-active");
				App.lhbDatas = jsonDatas;
				App.lhbData = updateLHBData(0, row.local_date);
				App.lhbDialogVisible = true;
			},
			error: function (err) {
				console.log(err)
				alert("此股票龙虎榜无数据")
			}
		})
	}

	function updateLHBData(index, lhb_date) {
		App.lhbDatas.sort(function (f, e) {
			if (f.date < e.date) {
				return 1;
			} else if (f.date == e.date) {
				if (f.reason < e.reason) {
					return 1;
				} else {
					return -1;
				}
			} else {
				return -1;
			}
		});
		let temp = {};
		for (let j = 0; j < App.lhbDatas.length; j++) {
			temp = App.lhbDatas[j];
			if (temp.date == lhb_date) {
				index = j;
			}
			for (let i = 0; i < temp.buy_seat.length; i++) {
				temp.buy_seat[i].net_amount = (parseFloat(temp.buy_seat[i].bamount) - parseFloat(temp.buy_seat[i].samount)).toFixed(
					2);
			}
			for (let i = 0; i < temp.sell_seat.length; i++) {
				temp.sell_seat[i].net_amount = (parseFloat(temp.sell_seat[i].bamount) - parseFloat(temp.sell_seat[i].samount)).toFixed(
					2);
			}
			if (temp.buy_seat.length == 0) {
				temp.buy_seat = [{
					"role": "buy_1",
					"samount": "0.0",
					"bamount": "0.0",
					"seat": "-"
				}];
			}
			if (temp.sell_seat.length == 0) {
				temp.sell_seat = [{
					"role": "sell_1",
					"samount": "0.0",
					"bamount": "0.0",
					"seat": "-"
				}];
			}
		}
		App.lhbData = App.lhbDatas[index];
		return App.lhbData;
	}
	function updateZTFXData(index, ztfx_date) {
		App.ztfxDatas.sort(function (f, e) {
			return (f.date < e.date) ? 1 : -1;
		});
		let temp = {};
		for (let j = 0; j < App.ztfxDatas.length; j++) {
			temp = App.ztfxDatas[j];
			if (temp.date == ztfx_date) {
				index = j;
			}
		}
		App.ztfxData = App.ztfxDatas[index];
		return App.ztfxData;
	}

	$('#mrzt-reset').on('click', resetAppData);
	//点击每日涨停查询按钮。
	// jumpAjaxData();
	// function jumpAjaxData() {

	// }

	// $('#zttj-query').on('click', function () {
	// 	let zttj = ztfpURL + "/zttj?start=" + $('[name="zttj-start"]').val() + "&end=" + $('[name="zttj-end"]').val();
	// 	// let allLb = "";
	// 	// console.log(this.allLb)
	// 	let loading = this.$loading({
	// 		lock: true,
	// 		text: '正在加载数据 请稍后...',
	// 		spinner: 'el-icon-loading',
	// 		background: 'rgba(0, 0, 0, 0.7)'
	// 	});

	// 	$.ajax({
	// 		type: "post",
	// 		url: zttj,
	// 		data: {},
	// 		success: function (res) {
	// 			console.log(res, "涨停统计查询")
	// 			if (res.code == 200) {
	// 				if (res.data.length < 2) {
	// 					alert('当前的筛选条件下没有数据。');
	// 				}
	// 				let Allzttj = []
	// 				for (let i = 0; i < res.data.length; i++) {
	// 					var obj = {}
	// 					obj.date = res.data[i].date;
	// 					obj.zt_sum = res.data[i].zt_sum
	// 					obj.allLb = res.data[i].lb_2_sum + res.data[i].lb_3_sum + res.data[i].lb_4_sum + res.data[i].lb_GTR5_sum
	// 					obj.yzb_sum = res.data[i].yzb_sum
	// 					obj.lb_2_sum = res.data[i].lb_2_sum
	// 					obj.lb_3_sum = res.data[i].lb_3_sum
	// 					obj.lb_4_sum = res.data[i].lb_4_sum
	// 					obj.lb_GTR5_sum = res.data[i].lb_GTR5_sum
	// 					obj.zt_0925 = res.data[i].zt_0925
	// 					obj.fb_1000 = res.data[i].fb_1000
	// 					obj.fb_1000_1130 = res.data[i].fb_1000_1130
	// 					obj.fb_13_14 = res.data[i].fb_13_14
	// 					obj.fb_14_15 = res.data[i].fb_14_15
	// 					obj.pb_sum = res.data[i].pb_sum
	// 					obj.fb_precentage = res.data[i].fb_precentage + "%"
	// 					obj.yje = res.data[i].yje
	// 					obj.ejs = res.data[i].ejs
	// 					obj.lbl = res.data[i].lbl
	// 					obj.zrlbl = res.data[i].zrlbl
	// 					obj.total_money = res.data[i].total_money
	// 					obj.sh_index_amount = res.data[i].sh_index_amount
	// 					obj.star_index_amount = res.data[i].star_index_amount
	// 					Allzttj[i] = obj
	// 				}
	// 				App.zttjTableData = Allzttj.splice(1)
	// 				loading.close();
	// 			} else if (res.code == -100) {
	// 				alert(res.message);
	// 				window.location.href = "http://www.wuylh.com/zthelper/ztindex.jsp";
	// 			}
	// 		},
	// 		error: function (err) {
	// 			console.log(err);
	// 			alert('网络请求失败，请检查网络，稍后再重新连接');
	// 		}
	// 	});
	// });
	function ziToNumber(zi) {
		if (zi.indexOf("万") != -1) {
			return (parseFloat(zi) * 10000).toFixed(0);
		} else if (zi.indexOf("亿") != -1) {
			return (parseFloat(zi) * 100000000).toFixed(0);
		} else {
			return parseFloat(zi).toFixed(0);
		}
	}
	function numberToZi(num) {
		if ((num / 100000000) > 1) {
			return (num / 100000000).toFixed(2) + "亿";
		} else if ((num / 10000) > 1) {
			return (num / 10000).toFixed(0) + "万";
		} else {
			return num + "";
		}
	}

	$("#ztfx").on('click', '[data-index]', function () {
		updateZTFXData(parseInt($(this).attr("data-index")), '123465');
	});

	function loadKLine(row) {
		// 加载股票的K线
		let jsonURL = ztfpURL + "/daily?code=" + row.stock_code;
		// let jsonURL = "/ztreplay/json/daily_" + row.stock_code + ".json";
		$.post(jsonURL, {}, function (jsonDatas) {
			// $.getJSON(jsonURL, {}, function(jsonDatas) {
			let dates = [];
			let data = [];
			let volumes = [];
			for (let i = 0; i < jsonDatas.length; i++) {
				// 日期，开盘价，收盘价，最高价，最低价，成交量
				dates.push(jsonDatas[i][0]);
				data.push(jsonDatas[i].slice(1, 6));
				volumes.push(jsonDatas[i][5]);
			}
			day_option.xAxis[0].data = dates;
			day_option.xAxis[1].data = dates;
			day_option.series[0].data = volumes;
			day_option.series[1].data = data;
			day_option.series[2].data = calculateMA(5, data);
			day_option.series[3].data = calculateMA(10, data);
			day_option.series[4].data = calculateMA(20, data);
			day_option.title.text = row.stock_name + "(" + row.stock_code + ") - 日K线图";
			day_option.dataZoom[0].start = ((day_option.series[1].data.length - 30) / day_option.series[1].data.length *
				100).toFixed(0);
			myDchart.setOption(day_option);
			//图表根据窗口大小自适应
			setTimeout(function () {
				window.onresize = function () {
					// myChart.resize();
					myDchart.resize();
				}
			})
		});
	}
	function loadZTFX(row) {
		// 加载涨停分析
		let jsonURL = ztfpURL + "/ztfx?code=" + row.stock_code;
		// jsonURL = "/ztreplay/json/ztfx_" + row.stock_code + ".json";
		$.post(jsonURL, {}, function (jsonDatas) {
			// $.getJSON(jsonURL, {}, function(jsonDatas) {
			App.ztfxDatas = jsonDatas;
			updateZTFXData(0, row.local_date);
		});
	}
	function initMRZT() {
		let mrzt = ztfpURL + "/mrzt?start=" + $('[name="mrzt-start"]').val() + "&end=" + $('[name="mrzt-end"]').val();
		$.ajax({
			type: "post",
			url: mrzt,
			data: {},
			success: function (res) {
				console.log(res)
				if (res.code == 200) {
					for (let i = 0; i < res.data.length; i++) {
						// res.data[i].zt_time = res.data[i].zt_time.substr(0, 5);
						// res.data[i].last_zttime = res.data[i].last_zttime.substr(0, 5);
						res.data[i].amount = numberToZi(res.data[i].amount * 10000);
						res.data[i].fbamount = numberToZi(res.data[i].fbamount * 10000);
						res.data[i].ltsz = numberToZi(res.data[i].ltsz * 10000);
						res.data[i].stock_code_name = res.data[i].stock_code + "<br>" + res.data[i].stock_name;
						res.data[i].fcb = res.data[i].fcb.toFixed(2)
						if (parseFloat(res.data[i].precent) >= 0) {
							res.data[i].precent_html = "<span style='color:red;'>" + res.data[i].precent + "</span>";
						} else {
							res.data[i].precent_html = "<span style='color:green;'>" + res.data[i].precent + "</span>";
						}
						if (parseInt(res.data[i].next_open_percent) <= -98) {
							res.data[i].next_open_percent_html = "-";
						} else if (res.data[i].next_open_percent > 0) {
							res.data[i].next_open_percent_html = "<span style='color:red;'>" + res.data[i].next_open_percent +
								"</span>";
						} else {
							res.data[i].next_open_percent_html = "<span style='color:green;'>" + res.data[i].next_open_percent +
								"</span>";
						}
						if (parseInt(res.data[i].next_high_percent) <= -98) {
							res.data[i].next_high_percent_html = "-";
						} else if (res.data[i].next_high_percent > 0) {
							res.data[i].next_high_percent_html = "<span style='color:red;'>" + res.data[i].next_high_percent +
								"</span>";
						} else {
							res.data[i].next_high_percent_html = "<span style='color:green;'>" + res.data[i].next_high_percent +
								"</span>";
						}
						if (parseInt(res.data[i].next_close_percent) <= -98) {
							res.data[i].next_close_percent_html = "-";
						} else if (res.data[i].next_close_percent > 0) {
							res.data[i].next_close_percent_html = "<span style='color:red;'>" + res.data[i].next_close_percent +
								"</span>";
						} else {
							res.data[i].next_close_percent_html = "<span style='color:green;'>" + res.data[i].next_close_percent +
								"</span>";
						}
					}
					App.mrztTableData = res.data;
					AllAppData = App.mrztTableData;
					App.AllBingo = res.data.length;
				} else if (res.code == -100) {
					alert(res.message);
					window.location.href = "http://www.wuylh.com/zthelper/ztindex.jsp";
				}
			},
			error: function (err) {
				console.log(err);
				alert('网络请求失败，请检查网络，稍后再重新连接');
			}
		});
	}
	initMRZT();
</script>


</html>